<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: include/hardware/rtc.h Source File</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.0.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('rp2__common_2hardware__rtc_2include_2hardware_2rtc_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle"><div class="title">rtc.h</div></div>
</div><!--header-->
<div class="contents">
<a href="rp2__common_2hardware__rtc_2include_2hardware_2rtc_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> */</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#ifndef _HARDWARE_RTC_H</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#define _HARDWARE_RTC_H</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &quot;<a class="code" href="pico_8h.html">pico.h</a>&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &quot;hardware/structs/rtc.h&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="group__hardware__rtc.html#ga05a9e12c70c56e6e2a9869d0682045d1">   40</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="group__hardware__rtc.html#ga05a9e12c70c56e6e2a9869d0682045d1">rtc_callback_t</a>)(void);</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__rtc.html#gacf9024748b942a7ae375cf75951afa9c">rtc_init</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__rtc.html#ga076d68dec35129dd2b44d16ae457a3de">rtc_set_datetime</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structdatetime__t.html">datetime_t</a> *t);</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__rtc.html#ga7c5528e71733b7bfc0b0543cd3bb6d3f">rtc_get_datetime</a>(<a class="code hl_struct" href="structdatetime__t.html">datetime_t</a> *t);</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__rtc.html#gabf6cc1546be8d1ddb56e3d83a915f683">rtc_running</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__rtc.html#gaac8ad85f301295b6a130aa8e00122253">rtc_set_alarm</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structdatetime__t.html">datetime_t</a> *t, <a class="code hl_typedef" href="group__hardware__rtc.html#ga05a9e12c70c56e6e2a9869d0682045d1">rtc_callback_t</a> user_callback);</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__rtc.html#gab7f69ee0de1cae2518b2822fd82d5201">rtc_enable_alarm</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span> </div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__rtc.html#ga718b866eab2ba73221d37f7d15ba9737">rtc_disable_alarm</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>}</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="agroup__hardware__rtc_html_ga05a9e12c70c56e6e2a9869d0682045d1"><div class="ttname"><a href="group__hardware__rtc.html#ga05a9e12c70c56e6e2a9869d0682045d1">rtc_callback_t</a></div><div class="ttdeci">void(* rtc_callback_t)(void)</div><div class="ttdef"><b>Definition:</b> rtc.h:40</div></div>
<div class="ttc" id="agroup__hardware__rtc_html_ga076d68dec35129dd2b44d16ae457a3de"><div class="ttname"><a href="group__hardware__rtc.html#ga076d68dec35129dd2b44d16ae457a3de">rtc_set_datetime</a></div><div class="ttdeci">bool rtc_set_datetime(const datetime_t *t)</div><div class="ttdoc">Set the RTC to the specified time.</div><div class="ttdef"><b>Definition:</b> rtc.c:54</div></div>
<div class="ttc" id="agroup__hardware__rtc_html_ga718b866eab2ba73221d37f7d15ba9737"><div class="ttname"><a href="group__hardware__rtc.html#ga718b866eab2ba73221d37f7d15ba9737">rtc_disable_alarm</a></div><div class="ttdeci">void rtc_disable_alarm(void)</div><div class="ttdoc">Disable the RTC alarm (if active)</div><div class="ttdef"><b>Definition:</b> rtc.c:184</div></div>
<div class="ttc" id="agroup__hardware__rtc_html_ga7c5528e71733b7bfc0b0543cd3bb6d3f"><div class="ttname"><a href="group__hardware__rtc.html#ga7c5528e71733b7bfc0b0543cd3bb6d3f">rtc_get_datetime</a></div><div class="ttdeci">bool rtc_get_datetime(datetime_t *t)</div><div class="ttdoc">Get the current time from the RTC.</div><div class="ttdef"><b>Definition:</b> rtc.c:87</div></div>
<div class="ttc" id="agroup__hardware__rtc_html_gaac8ad85f301295b6a130aa8e00122253"><div class="ttname"><a href="group__hardware__rtc.html#gaac8ad85f301295b6a130aa8e00122253">rtc_set_alarm</a></div><div class="ttdeci">void rtc_set_alarm(const datetime_t *t, rtc_callback_t user_callback)</div><div class="ttdoc">Set a time in the future for the RTC to call a user provided callback.</div><div class="ttdef"><b>Definition:</b> rtc.c:146</div></div>
<div class="ttc" id="agroup__hardware__rtc_html_gab7f69ee0de1cae2518b2822fd82d5201"><div class="ttname"><a href="group__hardware__rtc.html#gab7f69ee0de1cae2518b2822fd82d5201">rtc_enable_alarm</a></div><div class="ttdeci">void rtc_enable_alarm(void)</div><div class="ttdoc">Enable the RTC alarm (if inactive)</div><div class="ttdef"><b>Definition:</b> rtc.c:108</div></div>
<div class="ttc" id="agroup__hardware__rtc_html_gabf6cc1546be8d1ddb56e3d83a915f683"><div class="ttname"><a href="group__hardware__rtc.html#gabf6cc1546be8d1ddb56e3d83a915f683">rtc_running</a></div><div class="ttdeci">bool rtc_running(void)</div><div class="ttdoc">Is the RTC running?</div><div class="ttdef"><b>Definition:</b> rtc.c:18</div></div>
<div class="ttc" id="agroup__hardware__rtc_html_gacf9024748b942a7ae375cf75951afa9c"><div class="ttname"><a href="group__hardware__rtc.html#gacf9024748b942a7ae375cf75951afa9c">rtc_init</a></div><div class="ttdeci">void rtc_init(void)</div><div class="ttdoc">Initialise the RTC system.</div><div class="ttdef"><b>Definition:</b> rtc.c:22</div></div>
<div class="ttc" id="apico_8h_html"><div class="ttname"><a href="pico_8h.html">pico.h</a></div></div>
<div class="ttc" id="astructdatetime__t_html"><div class="ttname"><a href="structdatetime__t.html">datetime_t</a></div><div class="ttdoc">Structure containing date and time information.</div><div class="ttdef"><b>Definition:</b> types.h:107</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>